package com.foreknow.oop.hw8;

import java.util.Scanner;

public class User {
    private String user;    // 用户角色
    private int punch;      // 出拳
    private int score;      // 用户得分

    public User() {
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public int getPunch() {
        return punch;
    }

    public void setPunch(int punch) {
        this.punch = punch;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    /**
     * 出拳方法
     * @return
     */
    public int showFirst(){
        Scanner sc = new Scanner(System.in);
        System.out.print("请出拳：1、剪刀 2、石头 3、布（输入相应数字）：");
        int punch = sc.nextInt();
        System.out.printf("你出拳：%s\n",Util.getStringPunch(punch - 1));
        return punch;
    }
}
